from django.db import models


# 用户
class UserModel(models.Model):
    # 名字
    name = models.CharField(max_length=30, unique=True)
    # 头像
    icon = models.CharField(max_length=255)


# 相册
class PhotoModel(models.Model):
    # 图片地址
    img = models.CharField(max_length=255)
    # 图片所属用户
    user = models.ForeignKey(UserModel, on_delete=models.PROTECT)



